<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .body,.red,.green,.blue{
            width: 300px;
            height: 300px;
        }
        .body{
            overflow: hidden;
        }
        .red{
            background-color: red;
        }
        .green{
            background-color: green;
        }
        .blue{
            background-color: blue;
        }
    </style>
</head>
<body>
    <div>
        <a href="#div1">red</a>
        <a href="#div2">green</a>
        <a href="#div3">blue</a>
    </div>
    <div class="body">
        <div class="red" id="div1"></div>
        <div class="green" id="div2"></div>
        <div class="blue" id="div3"></div>
    </div>
</body>
</html>